<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBankCodes extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bank_codes', function (Blueprint $table) {
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';
            $table->comment = '银行卡名称和编码表';
            $table->increments('id');
            $table->string('bank_name',255)->comment('银行卡名称');
            $table->string('bank_name_show',255)->comment('银行展示名称');
            $table->string('bank_code',255)->comment('银行编码');
            $table->index('bank_name_show', 'bank_name_show');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('bank_codes');
    }
}
